What is Quack

Quack is a Win95/98/NT4 application which can be used to generate a wide variety of electronic sound effects. The sounds produced by Quack can be stored as WAV files, and may be used by any other applications which accept the WAV format (including Sound Recorder and Media Player).

Quack is modeled on an analog “patch board” synthesizer. It provides a wide variety of audio components - such as oscillators, filters, modulators, envelope generators, noise sources - which can be connected together to produce complex sounds.

Quack can also read in existing WAV files (for example, sounds sampled using Sound Recorder), and incorporate them into sound effects.

The next section is a short tutorial guide to using Quack.


Tutorial: Basic Ideas

The next few sections provide a tutorial introduction to Quack. You might want to work through this, to get a feel for how Quack works. After that, the remainder of this help file provides a reference covering each component in detail.

Quack contains a number of components. You can imagine Quack as being a bit like a hi-fi. Your hi-fi probably has a CD player, maybe a graphic equalizer, and certainly an amplifier and speakers. You plug the output of the CD player into the input of the graphic equalizer, you plug the output of equalizer into the amplifier, and you plug the output of the amp into your speakers. The speakers don’t have an (electrical) output, of course – they just make noise.

Quack works in the same way, except it has a lot more types of component, and most components have several inputs, so much more complex configurations are possible. If you are familiar with the old patchboard analog electronic synthesizers, you will notice that Quack is the modern day equivalent.

The following is an example of a fairly simple Quack file to simulate the sound of a wood block being tapped:

It isn’t important to go into detail as to how this works at this stage, but essentially the sine component generates a high pitch tone, while the noise component produces white noise (a hissing sound). These two sounds are mixed together in the merger. The ADSR component controls the volume of the signal – it makes the volume rise quickly from zero to maximum, and than fall quickly back to zero, giving a very short percussive effect. Finally the signal is fed into the recorder, which writes the sound to disk.

As you will probably have noticed, Quack uses green dots to represent inputs, and red dots to represent outputs. Inputs are labeled with the name of the input (eg the Freq input controls frequency).

The recorder is an important component, and also a bit of a special case. Firstly, every patch map must have exactly one recorder. In fact, Quack enforces this, by automatically creating a recorder to start with, and then not allowing you to either delete it or create another. The other thing you will notice about the recorder is that it doesn’t have an output connection – just like the hi-fi speakers.

This tutorial teaches the mechanics of using the program, and also the theory behind some of the components themselves. By the time you have completed this tutorial, you will hopefully have seen enough to be able to explore the remaining components which are described in the reference section of this help file.


Tutorial: Creating a simple sound

Now we will create our first, very simple sound, step by step. We will create a simple tone.

1)	Open Quack. A new, empty patch map will be created (a patch map is just the name for a Quack document). The document already contains a recorder component which has been created automatically for you. It will look something like this:

2)	Add a new Sine Wave component. You do this by selecting Component|New|Source|Sinewave Generator on the menu, or by pressing the [image] button on the Source toolbar. You will see the following dialog.

3)	Don’t change anything in the dialog, just click OK. A new Sinewave component will be added to your patchmap, and it should look like this:

4)	Next, you must connect the output of the sine component to the input of the recorder. This connection allows the signal to flow from the sine component to the recorder, so that it can be written to file. To make the connections, simply drag the mouse from the red dot (output) of the sine to the green dot (input) of the recorder. When you do this, a connection is made and it should look like:

5)	Now you just need to create the sound, and play it. You can do this in one step via the Sound|Create and Play menu item, or using the [image] button. The sound should play for exactly 1 second.

If you completed this successfully, there are a couple more experiments you might like to try. The file created here is laso available in the Examples folder, called simple.pm

Firstly, try creating a new patch map then repeating the steps above, but using a sawtooth wave. Then a square wave. You should notice a difference in the sound, from the very pure sound of the sine through to the very harsh square wave. As a contrast, try the noise component.

Now a second experiment. Using the sine example, try right clicking on the sine component, and selecting Inputs. This will bring up the inputs dialog you saw in stage 2. Try altering the Frequency value from 400 (the default) to say 600. Create and play again and you will notice a change of tone.


Tutorial: Connecting components

In this section, we will learn how to connect components, so that the output of one component controls the input of another. This is the basic way that Quack produces complex and interesting time-varying sounds.

As we saw in the previous example, most components have one or more inputs, which can be modified using the Inputs dialog. But you can also connect another component’s output to the input to override the value in the Inputs dialog.

In addition to inputs, some components have properties. Properties are parameters of the sound which are fixed for the duration of the sound, unlike inputs which can change throughout the sound. For example, we will meet the Sweep component. This is a simple component which generates a ramp signal – it has a start value and an end value. Its output starts at the start value, and progresses towards the end value over the course of the sound.

The important point is, the start and end values of the sweep must be selected before the sound starts – it makes no sense to let them vary with time. The start and end values are properties – they do not have corresponding input signals, the value you choose in the dialog is the value which will be used.

There is a third point illustrated here, about signals. The output signal of a component can take any value, it isn’t limited to a specific range. All calculations in Quack are fully floating point. However, you do need to ensure that the final signal which reaches the recorder is in the range +/- 1.0 (see later).

1)	Follow the steps in the previous example to create a simple sine tone.

2)	Add a Sweep component, either using the Component|New|Envelope|Sweep menu item, or the [image] button. You will see the Properties dialog – set a range of 200 to 1600 as shown below:

3)	Next you will see the Inputs dialog – don’t change anything. Finally, connect the output of the Sweep to the Frequency input of the Sine component. This means that the sweep signal will control the frequency, and will make it sweep from 200 to 1600 cycles/sec over the course of the sound

4)	Use Create and Play to try the sound. The patch map for this sound is available as connect.pm in the Examples folder.

You should hear a rising pitched tone. You might want to try altering the start and end frequencies by editing the Properties of the Sweep. (Right click it and select Properties from the context menu).

Another interesting thing to do is to look at the Inputs dialog of the Sine component. You will see that the frequency value is greyed out, and shows the name of the Sweep component, Sweep1, indicating that the inout is controlled by that component.


Tutorial: Editing tips

At this stage, we will just introduce a few editing shortcuts.

Firstly, you know about the context menu which pops up when you right click any component. This allows you to:

•	Edit the component’s Inputs

•	Edit the component’s Properties (if it has any)

•	Delete the component, and any connections it has

•	Disconnect the component’s output – you shouldn’t usually have to do this (see below)

•	Rename the component. All components are automatically given a default name when they are created, such as Sine1 or Sweep2, but you might prefer to give your components names which indicate their purpose.

Another thing you night find useful as your patch maps become more complex, is that you can move components around on the page – simply drag them by their title bars!

Finally, you will need to make, break and alter connections quite frequently. Simply drag from any input to any output, or vice versa. The only thing you cannot do is to connect a component to itself (that would be a pretty useless thing to do anyway).

All connections are one to one – you can’t connect an output to more than one input, you can’t connect an input to more than one output. But, when you make a new connection, any conflicting connections are automatically broken. So, as stated earlier, you should hardly ever need to explicitly disconnect an output.


Tutorial: The Recorder

By now, you might be wondering, how come all the sounds created are 1 second long? How do I create a sound file rather than just listening to a sound?

Well, the Recorder component is responsible for actually producing the sound, so as you might guess, these aspects are controlled by the Properties of the recorder. Try right clicking the recorder, and editing its properties:

Duration is the duration of the sound, in seconds. Quack can generate long sounds, but for experimenting it is usually best to keep it short – it is quicker to create a short sound and quicker to listen to it!

Volume acts as an overall volume control. As we said before, signals in Quack can take any value – but the signal you finally write out to file, or play on your soundcard, must be limited to a range of +1 to –1. In fact, the peak signal should be as close as possible to 1 (without exceeding it). If your peak signal is too low, the file will be very quiet, if the peak signal is too high it will distort.

If you design your sound carefully, you should try to make sure that the signal you feed into the Recorder is correct – but, if things don’t quite work out that way, theVolume property is your last line of defence! If you have just designed a killer sound but its peak volume is 2 – simply set the Volume  to 0.5 and it will all be OK.

(If you get the volume wrong, Quack will suggest an optimal volume, and automatically recreate the sound).

Destination Type is always file. The Filename controls where the WAV file will be stored. When you Create and Play a sound, Quack first creates the named WAV file, then plays it. You can also use Sound|Create [image] to create the file without playing it, or Sound|Play [image] to play the most recently created sound file.

Samples/sec controls the sample rate. The basic trade off here is that higher sample rates sound better – but the sound takes longer to produce and creates a bigger WAV file. 44100 sample rate is often described as “CD quality”. You can go higher than this, but it shouldn’t be necessary for experimenting. 5000 is often described as “telephone quality” – the files are very small, but the quality is probably too poor for most applications. Somewhere in between (11025 or 22050)  is probably best for experimenting.

Bits/sample controls the amplitude resolution of the sound. A 16 bit file has 65536 possible sound levels, an 8 bit file has just 256. We recommend using 16 bit, but if you want smaller files at the expense of quality then an 8 bit file is half the size.

Stereo produces a stereo file. We discuss stereo working later on. However, for an individual sound effect, it is often best to work in mono, and then position the sound in stereo space when you mix it with other sounds.


Tutorial: Sirens

Now we are going to up the pace a little, and present some sample patch maps without going through each step of creating them. You can open the patch map, look at the inputs and properties of the components, and experiment with altering the parameters.

First, here is a simple siren sound, available as siren1.pm in the examples folder:

The siren sound is created by Square1. We use a square wave because it creates a nice raucous sound! To achieve a siren effect we need to make the pitch rise and fall with time – we do this with Saw1.

If you look at the inputs of Saw1, you will see several interesting things. First the frequency is very low, just 2 cycles/sec – so the siren pitch rises and falls twice each second.

In addition, we have assigned an offset of 600, with a volume of 500. Normally (zero offset) the output of a wave generator fluctuates between positive and negative values. But the offset shifts all the values up by 600 – so instead of the oupt varying from –500 to +500, with the offset it varies between 100 and 1100.

The other thing to note is that the Rise/Fall ratio (R/F) has been set to 0.1 – this means that the wave is not symmetrical, but instead it rises quickly and falls more slowly (it takes just 10% of the cycle to rise, but 90% to fall). Listen out for this. Try setting the R/F back to its default, 0.5, and hear the difference.

The next siren uses basically the same technique, and is available as siren2.pm in the examples folder:

This time, we have softened it down a bit – using a saw wave as the tone, which is less harsh than a square wave. Also the frequency range is reduced, just 300 to 500. But the main change is an additional saw wave which varies the volume of the tone.

The volume is varied between 0.2 and 1.0, over the same cycle as the frequency variation. However, the waveform controlling the volume has an R/F of 0.3, so it peaks at a different point to the frequency – this just adds a bit more interest to the sound.


Tutorial: Instruments

Here we present 3 simple simulations of musical instruments playing a single note.

Firstly, we have note1.pm:

Here we are using a Fourier Wave Generator to create the sound. This allows you to create a wide variety of interesting waveforms, by specifying the harmonics you require (try editing the Properties of the wave). If you are not familiar with Fourier series, it is a bit beyond the scope of this tutorial, but well worth looking up elsewhere.

We are also using an ADSR (Attack-Decay-Sustain-Release) envelope to control the volume of the sound over time. This causes the volume to rise rapidly at first (the Attack), then to fall away slightly (the Decay), then to maintain its level until towards the end of the time (Sustain), and finally to fall back to zero (the Release). Try editing the ADSR to see the shape of the envelope, and to try modifying it. Note that you can only control the time of the Attack, Decay and Release phases. The Sustain time is automatically extended to stretch the envelope out to the full time of the sound.

Finally, we are also modulating the volume of the wave, slightly, at about 10 cycles/sec. This introduces a tremolo effect.

Next is note2.pm:

This uses a different ADSR – this time the attack is very slow. There is no decay, the sound just peaks and stays there until right at the end when the release phase takes it back to zero. It is an Attack-Sustain-Release envelope! How is this achieved? Simply, by setting the Sustain level to the same value (1.0) as the peak level. So the decay and sustain periods merge.

This patch maps also uses vibrato, that is, the frequency fluctuates slightly. The technique is exactly the same as the previous Siren sample, but the variation is much more subtle – the frequency only varies between 399 and 401 cycles/sec. In the Siren example the frequency varied from 100 to 1100! Also, we use the sweep signal to introduce the vibrato gradually, starting from nothing and building up. This is called delayed vibrato.

For simplicity, we have used a saw wave as the basic signal – if you have been experimenting with the Fourier component, try using that instead.

Finally there is note3.pm:

This simulates a tom-tom. Basically, it uses a very short Attack-Decay envelope, with a low frequency (200 cycles/sec) sine wave as the source. To create and Attack-Decay envelope, simply set the sustain level to 0.

To make the sound lightly more interesting, we sweep the frequency from 200 to 300 over the course of the sound.


Tutorial: Stereo

So far, we have dealt only with mono sounds. This has just one signal channel – if you play it on your stereo sound card, the same signal is played on both speakers.

A stereo sound, of course, has 2 channels, one for the left speaker and one for the right speaker. By sending slightly different signals to each speaker, we can create the illusion that different sounds are coming from different places. Quack does this is quite a simple way – you start with a mono sound, and you can control how much of it goes to each channel.

To understand how Quack handles stereo sound, we will go back to an earlier example, connect.pm:

Now see what happens if you turn on stereo in the Recorder component Properties (see stereo1.pm):

You will notice that the connections are shown as double lines – this indicates that the data flowing across each connection is stereo data. But you might be a little disappointed if you listen to the sound – it sounds exactly the same as the mono sound.

Why is that? Well, the sound file produced is stereo, there are separate left and right channels, but the signals are identical, so it might as well be a mono file!

Here’s how it works. When Quack starts to produce the sound, the recorder component looks at its properties, and decides what sort of sound it has been asked to create – the quality, the duration, and whether it is mono or stereo. Then it tells the previous component, Sine1, what it needs. Sine1 in turn tells Sweep1 what sort of sound is required. This has to be done right at the beginning, if you think about it – Sweep1 needs to know the sounds duration so that it can sweep at the right speed.

So in this case, Sweep1 is asked to produce a stereo signal. But of course, it only has one start and end point. There is no way to control the left and right channels independently, so it produces a stereo signal with identical left and right data. Sine1 does the same thing and passes the data to Recorder, which writes it to file.

We want to something a bit more interesting than that – we want the signal to appear to start at the left and move to the right. See stereo2.pm:

The Mono To Stereo Pan component always takes in a mono Signal, and also a mono Pan input. It splits the signal between the left and right channels of its output depending on the Pan control. 0 sends the signal to the left, 1 sends the signal to the right, values in between send the signal part to the left and part to the right. For example a Pan of 0.3 sends (signal*0.7) to the left, and (signal*0.3) to the right.

Notice how the diagram automatically shows the stereo and mono flows. All the signals feeding into the pan control are mono. The pan control takes this mono signally and sweeps it from the left to right speakers.

There is another component, the Mono To Stereo Splitter, which does a very similar job, but it offers independent control over how the signal is split out to left and right.

Also there are couple of components for converting stereo to mono (Stereo To Mono Pan, and Stereo To Mono Merge). These allow the left and right channels of the input signal to be combined in varying proportions to make a mono signal. You probably won’t need this as often, but it can be useful if you are starting from an existing stereo WAV file and you want to incorporate it into a mono signal.

Finally there is the Stereo To Stereo Cross, which takes in a stereo sound and allows the left and right channels to be cross mixed in any combination to create a new stereo signal.

What you will notice about these last 3 components is that, although they require a stereo Signal input, the other inputs are mono.


Using Components

A patch map is created by connecting components together.

This section describes how to create, edit and delete components in a patch map.

After reading this topic, continue the browse sequence to learn how to connect the components to produce a patch map.

Creating a new component

Quack components are divided into groups: Sources, Mixers, Envelopes, Filters and Stereo components. Each group has its own toolbar for quickly creating new components.

1.	If the required toolbar is not visible, choose View|Toolbars on the main menu.

2.	Click the required component in the toolbar.

3.	A dialog box will appear which allows you to set up the Properties of the new component - the dialog depends on what type of component you have created. See the list of components in the contents page. Some components have no Properties, so this dialog will not appear.

4.	A dialog box will appear which allows you to set up the Inputs of the new component - the dialog depends on what type of component you have created. See the list of components in the contents page. Some components have no Inputs, so this dialog will not appear.

The new component will automatically be given a name (for example, a modulator will be called mod 5 or something similar, where the number is unique). It will be displayed in the patch map, initially unconnected to any other components.

Editing a component

You can change various aspects of a component, at any time either before or after you have connected it. Right click on the component and choose:

•	Properties to alter the components properties. Some components do not have properties, so this will not be available for those components.

•	Inputs to alter the components properties. Some components do not have inputs, so this will not be available for those components. The inputs dialog lets you choose the value of any inputs which are not currently connected. If the input is connected to a different component, you will not be able to assign a value.

•	Rename to alter the components name. You can choose any unique name.

Deleting a component

1.	Click the component with the right mouse button.

2.	Choose Delete from the popup menu which appears.

3.	The component and any connections will be deleted.


Using Connections

A patch map is created by connecting components together.

This section describes how to create and delete connections in a patch map.

You can connect the output of any component to the input of any other component (You can’t connect a component’s output to one of its own inputs, that would make no sense). When you make a connection, the output of the first component controls the value of the input of the second component. Alternatively, if an input is left unconnected, its value will be controlled by the value entered in the Inputs dialog.

After reading this topic, continue the browse sequence to learn how to save your completed patch map, and how to generate a sound file using the patch map.

The diagram shows a typical component. Most components have one or more inputs and one output. There are exceptions, for example the Recorder component has no output node – it doesn’t need one because it is always the component at the head of the chain.

Creating a new connection

1.	Position the cursor over the output of the first component.

2.	Hold down the left mouse button, and drag the cursor to the second component. The cursor will change to a crosshair.

3.	Position the cursor over the input of a second component. The cursor will change to a target. Release the button.

Alternatively, you connect from the input of one component to the output of another.

Connections are strictly one to one. You cannot connect an output to more than one input, and you cannot connect more than one output into the same input. If you make a new connection between an input and output node, any existing connections to those nodes will be automatically deleted.

Deleting a connection

1.	Position the cursor over the component whose output you want to disconnect.

2.	Click the right mouse button.

3.	Choose Disconnect from the popup menu

Note that, often, you don’t need to delete the connection. If you have a node which is already connected but you want to connect it to something else, just make the new connection. The old one will be deleted automatically.

Changing the layout

As you add new components and connections, you will probably find that the diagram starts looking very messy. You can drag the components around on the page to create a neat and clear diagram. Simply drag the components by their title bars.

The layout of the diagram doesn’t affect the sound, of course – but it will make the diagram a lot easier to understand.


Saving and restoring patch maps

Us the standard File menu commands Save, Save As, Open and New to save and restore patch map files. You can only work on one patch map at a time when using Quack.

Patch maps are usually stored with the filename extension .pm. For example patch.pm

Remember that the patch map file is not a sound file. The patch map describes how to create a particular sound, but it does not contain the sound itself. Continue with this browse sequence to learn how to create a sound file from the patch map.

Also remember that if you use the WAV Sample component to read samples into your sounds, the sample files are NOT stored as part of the patch map. They must be backed up separately if they are important.


Creating a sound file

Before creating a sound file, you must create a patch map as described in the Tutorial and subsequent topics.

Either click the [image] create button on the toolbar, or select Sound|Create from the menu.

When you hit the OK button, the sound file will be generated. The amount of time taken to create a sound file depends on the length of the sound, the complexity of the patch map, and of course the power of your computer. A reasonably up to date PC should be able to produce moderately complex sounds in real time.

The name of the WAV file created is determined by the Filename property of the Recorder component

After creating the file, Quack will report the peak amplitude of the signal stored to file. This amplitude should be somewhere between 0.5 and 1.0 for best results - if the signal is outside this range, you should change the Volume of the Recorder component as the report instructs. If you don’t, the sound produced could be distorted, and will certainly not be as good as it could be.

The file produced will always be in the WAV format. You can choose the sample rate, bits per sample, stereo/mono mode, and volume by editing the Recorder component parameters. See the technical note on Output file parameters for more details.

TIP: Use Create and Play to automatically play the sound after creating it, if you are experimenting with different parameters.


Playing a sound file

You can play a WAV file from within Quack Sound Effects Studio.

Either click the [image] play button on the toolbar, or select Sound|Play from the menu.

This will play the current WAV file, ie the WAV file referenced in the Properties of the recorder component.

TIP: Use Create and Play to automatically re-create and then play a sound, if you are experimenting with different parameters.


Tools Menu

There are many excellent freeware, shareware and commercial audio applications around which can be used in conjunction with QUACK to further enhance the sounds you can create. To make life easier, QUACK has a Tools menu to which you can add your favourite:

•	WAV Player

•	WAV Recorder

•	WAV Editor

•	Spectrum Analyser

Use the Tools|Properties menu option to define the path of whichever program you want to use for each function. You can use the same program for more than one of these functions, of course, or you can leave some of the fields blank if you do not need them.

We recommend that you use the built-in WAV Player (the Sound|Play option) while you are experimenting, because it is more fully integrated and therefore quicker to use.


List of Components

The following components are available:

Recorder Component

 Recorder Component

Wave form generators/Signal sources

 Sine Wave Generator

 Sawtooth Generator

 Square Wave Generator

 Noise Generator

 Fourier Wave Generator

 WAV Sample

Signal Mixers

 Mixer

 Modulator

 Merger

 Sequencer

 Music Modulator

 Sample and Hold

Envelope generators

 Sweep Envelope Generator

 ADSR Envelope Generator

 Generic Envelope Generator

Filters

 Comb Filter

 Echo

 Fuzz

 Moving Average (Top Hat)Filter

Stereo

 Mono To Stereo Splitter

 Mono To Stereo Pan

 Stereo To Mono Merger

 Stereo To Mono Pan

 Stereo To Stereo Cross


Recorder Component

Every patch map has one (and only one) Recorder component. This is the component which actually produces to output sound file. Whatever signal feeds the input of this component will end up in the sound file.

The parameters of this component control the type of WAV data which will be created.

Parameters

Volume	Controls the volume of the sound in the file. The easiest way to obtain the correct volume is to start with this parameter set to 1. When you Run the patch map to produce a sound file, Quack will detect if the signal is too weak or too strong, and advise you of a suitable value for Volume.
Duration	Controls the duration of the file, in seconds.
Destination	Currently, all output is directed to WAV File. In future, real time play options may be added.
Filename	The name of the WAV file where the output will be written. You can use the Browse button to select this.
Samples Per Second	See the technical note on Output File Parameters.
Bits Per Sample	See the technical note on Output File Parameters.
Stereo	See the technical note on Stereo Sound.
Inputs

Signal	The input signal which will written to file
Uses and Examples

Typically, the Recorder is simply fed by the signal generated by the patch map.


 Sine Wave Generator

Produces a sine wave output which may be used to produce a pure tone, or as an envelope to produce vibrato or tremolo effects.

Inputs

Freq	Frequency in Hertz (or cycles/per second) of the tone generated.
Volume	Peak volume of the signal generated.
Phase	Offsets the current phase, see Mathematical definition
Offset	DC offset added to the signal, see Note on waveform offsets

The signal oscillates between two extreme values (given by plus Volume and minus Volume). Initially, the wave starts at zero (by default).

Uses and Examples

Use this component to generate pure tones in the audible range. Choose Frequency of anywhere from 20 to 20,000. Set the Volume to about 1, and use an offset of 0.0

To generate tremolo or vibrato effects, use a low frequency (less than about 20), and use the Offset to create a suitable waveform (see Note on waveform offsets).

Mathematical Definition

A sine wave is defined by:

Output(t) = Offset(t) + Volume(t)*sin(2*PI*x(t))

A simple definition of x, assuming that phase and frequency are constant, is:

x(t) = Phase + Freq*t

However Freq is an input, so it might change with time. To create a continuous signal, we need to calculate x incrementally:

y(t+dt) = y(t) + Freq(t+dt)*dt

x(t) = Phase(t) + y(t)

where dt is the sample time (eg if the sample rate is 10000Hz, dt = 0.0001).

In fact, there is yet another twist - although in strict mathematical terms x can continue getting larger and larger (the sine function repeats forever), in computational terms we can only represent floating point number accurately over a limited range. So, we normalise y(t) and x(t), that is if the value goes outside the range 0<=x<1 we add or subract 1 until it is in range:

Normalise(0.7) gives 0.7

Normalise(3.7) gives 0.7 (subtract 3)

Normalise(-1.3) gives 0.7 (add 2)

x is refered to as the normalised phase parameter.


 Sawtooth Generator

Produces a sawtooth output which may be used to produce a tone, or as an envelope to produce vibrato or tremolo effects.

Inputs

Freq	Frequency in Hertz (or cycles/per second) of the tone generated.
Volume	Peak volume of the signal generated.
R/F	Rise/Fall ratio. The normal range of this signal is 0 to 1. Values less than 0 are treated as 0, values greater than 1 are treated as 1.
Phase	Offsets the current phase, see Mathematical Definition
Offset	DC offset added to the signal, see Note on waveform offsets

The signal oscillates between two extreme values (given by plus Volume and minus Volume). Initially, the wave starts at the lowest value, as shown in the diagram. The shaded area represents one complete wave period.

The Rise Time controls how much of the cycle is spent at the high value. It is a value between 0 and 1. A Rise Time of 0.5 gives a true Sawtooth. The diagram shows a rise time of about 0.2 (the signal takes 20% of the time to rise, and 80% of the time to fall).

Uses and Examples

This component is similar to the Sine Wave Generator but has a different wave form, with higher frequency harmonics present, giving a more brassy sound.

Mathematical Definition

A saw wave is defined by:

Output(t) = Offset(t) + Volume(t)*saw(x(t))

where x(t) is the normalised phase parameter. See the description for the Sine Wave Generator

saw(x) is defined in terms of the rise fall ratio R/F:

if x < RFRatio

2*(x / RFRatio) - 1

else

2*((1-x) /(1- RFRatio)) - 1

RFRatio values of exactly 0.0 or 1.0 are special cases.


 Square Wave Generator

Produces a square wave output which may be used to produce a tone, or as an envelope to produce vibrato or tremolo effects. It may also be used to switch other signals on and off periodically.

Inputs

Freq	Frequency in Hertz (or cycles/per second) of the tone generated.
Volume	Peak volume of the signal generated.
M/S	Mark/Space ratio. The normal range of this signal is 0 to 1. Values less than 0 are treated as 0, values greater than 1 are treated as 1.
Phase	Offsets the current phase, see Mathematical Definition
Offset	DC offset added to the signal, see Note on waveform offsets

The signal oscillates between two extreme values (given by plus Volume and minus Volume). Initially, the wave starts at the high value, as shown in the diagram. The shaded area represents one complete wave period.

The Mark/Space ratio controls how much of the cycle is spent at the high value. It is a value between 0 and 1. A Mark Time of 0.5 gives a true Square Wave. The diagram shows a mark time of about 0.2 (the signal is high for 20% of the time, low for 80% of the time).

Uses and Examples

This component is similar to the Sine Wave Generator but has a different wave form, with higher frequency harmonics present, giving a more electronic sound.

An additional use for this component is as a gate to control other signals. To do this, set the Volume to 0.5, and use an Offset of 0.5. The result is a signal which switches between 1.0 and 0.0 during each cycle. If this signal is used to control the volume of another signal, it will effectively turn the signal on and off periodically.

Mathematical Definition

A square wave is defined by:

Output(t) = Offset(t) + Volume(t)*sqr(x(t))

where x(t) is the normalised phase parameter. See the description for the Sine Wave Generator

sqr(x) is defined in terms of the mark space ratio:

if x < MSRatio

1

else

-1


 Noise Generator

Produces white noise output. White noise is a useful starting point for many sounds, especially after filtering.

Inputs

Volume	Peak volume of the signal generated.
Offset	DC offset added to the signal, see Note on waveform offsets

The signal varies randomly between two extreme values (given by plus Volume and minus Volume). The signal produced has an approximately even frequency spectrum across the audible range.

If an offset is specified (other than zero), the signal varies randomly between Offset+Volume and Offset-Volume.

Uses and Examples

The raw output from this component sounds like a continuous hiss. It may be used to add noise or hiss to percussive sounds like drum beats or cymbals. It can also be used to produce a “breathed” quality for wind instruments.

Mathematical Definition

Output(t) = Offset(t) + Volume(t)*rand(t)

Where rand(t) is a function who’s value at time t is completely random, within the range +/-1

In fact, the rand(t) used is not random at all, it is generated from a table designed to give a reasonable approximation to a pure noise signal over the audible range of frequencies. The advantage of this is that the noise signal is recreatable, so you get exactly the same wave file each time you run the program.


 Fourier Wave

This component allows you to create your own waveform by mixing harmonics of different amplitudes and phases. You can specify up to 4095 harmonics, as well as the frequency and volume of the final waveform.

Note - this section assumes that you already have a basic understanding of the principles of Fourier synthesis.

Parameters

Harmonics	The set of harmonics which make up the waveform can be controlled as described below.
Inputs

Freq	Frequency in Hertz (or cycles/per second) of the tone generated.
Volume	Controls the amplitude of the signal generated. The power and peak amplitude of the signal is determined by the sum of the components. Volume  acts as a multiplier on top of this.
Phase	Offsets the current phase, see Mathematical definition.
Offset	DC offset added to the signal, see Note on waveform offsets

The dialog allows you to edit the harmonics, using the Add, Edit and Delete buttons. Each harmonic has an order (eg 1 for the first harmonic, 3 for the third harmonic, etc), and amplitude and a phase.

The highest order harmonic allowed is 4095. Of course, the lowest order is 1.

Typical amplitude values are 1.0 or less. You should normally aim to produce a signal whose peak value is close to (but not greater than) 1.0.

Phase is a value between 0 and 1 which determines the initial phase value of the harmonic. For example, if the phase is 0.25, the wave starts off 25% into its first cycle. Varying the phases can have a dramatic effect on the shape of the wave, but sometimes it makes very little difference to the sound.

The Normalise button alters the harmonic amplitudes to ensure that the peak signal is exactly 1.0

For more efficient entry of harmonics, you can generate harmonics automatically from a mathematical series. You can also import harmonics from a simple text file, possibly produced by a spreadsheet or a spectrum analysis program.

Uses and Examples

Use this component to generate complex tones in the audible range. Choose Frequency of anywhere from 20 to 20,000. Set the Volume to about 1, and use an offset of 0.0

To generate tremolo or vibrato effects, use a low frequency (less than about 20), and use the Offset to create a suitable waveform (see Note on waveform offsets).

Mathematical Definition

A square wave is defined by:

Output(t) = Offset(t) + Volume(t)*Fourier(x(t))

where x(t) is the normalised phase parameter. See the description for the Sine Wave Generator

The function Fourier is defined by the set of harmonic components. Each harmonic has an amplitude and a phase, amplitude[n] and phase[n]

Fourier(x(t)) = SUM over all n of (amplitude[n]*sine(2*PI*(x(t)+phase[n])))


Fourier Wave - Add Series
Fourier Wave – Add Series

Using the Add Series button, you can add a whole series of harmonics in one operation. The amplitude of each harmonic is calculated according to a mathematical formula. The phase of each harmonic is set to zero.

The current release supports the formula

a/(n**b)

where n is the harmonic number, and a, b are parameters you can define. This allows various standard and not so standard waves to be created.

You can define the first and last harmonic generated, and also a step parameter. You can use step to skip harmonics, eg if start is 2 and skip is 3 you will get harmonics 2, 5, 8 etc but none in between.

As an example, the harmonic series for a square wave contains just the odd harmonics. The amplitude of harmonic 1 is 1, for harmonic 3 is one third, for haramonic 5 is one fifth, etc. To generate a perfect squarewave requires an infinite series of harmonics, and clearly there are easier ways of doing it (using the built in Square Wave component for example). But as an example, try using the following values:

•	First harmonic 1

•	Step 2 (to give just the odd harmonics)

•	Last harmonic 100 (this is enough to give a reasonable approximation)

•	a = 1

•	b = 1

TIP – don’t use too many harmonics, it can slow the program tremendously! It is easy to add over 4000 harmonics with this feature, but that is seldom necessary and can make the program run very slowly.

For example, if you are producing a 400Hz tone, the 50th harmonic will be 20,000Hz, which is pretty much at the limits of human hearing. Even if you allow yourself a factor of 2 as a safety net, you should not need to go beyond 100 harmonics.


Fourier Wave -Import
Fourier Wave – Import

You can import harmonics from a simple text file. This allows you to create harmonics in another program, for example a spreadsheet (if you have your own custom algorithms for generating amplitudes and phases) or a spectrum analysis program (if its output can be formatted to match the requirement).

The format is very simple. It is just a text file with one line per harmonic. Each line needs to contain 3 numbers, separated by spaces. These are the order, amplitude and phase of the harmonic. The file should not contain any other characters. As an example, the following file will produce an approximation to a square wave using 3 harmonics

1 1.0 0.0

3 0.3333333 0.0

5 0.2 0.0

(See the description of a square wave in the Add Series section).

As described in the Add Series section, you should try not to use an excessive number of harmonics, as this may affect the performance of the component, and in any case is often unnecessary.


  WAV Sample

Reads a WAV sample file in. This allows real sounds to be processed and incorporated into a patch map.

The function only accepts uncompressed WAV files

Parameters

Filename	The name of a WAV format file. Use can use the Browse button to help locate a sound file. After choosing a file, you can use the Info button to find out the duration, sample rate and bits per sample of the file. The Info button is also a very good way of checking that the sound file is of a type which Quack supports. Note that the sound data is not included as part of the patchmap file. If you open the patch map again later and try to recreate the sound, the oroginal WAV file must still be available.
Inputs

Volume	Acts as a volume control on the signal

The parameters of the input WAV file do not need to match the parameters of the sound being created:

•	Bits per sample will be adjusted automatically.

•	The sample rate will also be adjusted automatically, so that the sound plays correctly.

•	If the input file runs out, zero data will be substituted.

•	Stereo/mono conversions will be made as necessary. If you use a mono sound file in a stereo workflow, the single channel will be used for both left and right. If you use a streo sound file in a mono workflow, a mono channel will be created by taking the average of the left and right channels. If you want to do something more sophisticated, see the section on working with stereo.

These conversions are automatic, but they cannot work miracles. If you take an 8 bit sound file with a 5KHz sample rate, you can happily incorporate it into a CD quality patchmap – it just won’t sound very good, because the quality just isn’t there in the first place.

Uses and Examples

The ability to incorporate real sounds into patch maps can give you an excellent “head start” in generating a new sound. The imported sound can be embellished in subtle ways, for example by adding tremolo. It can also be distorted beyond recognition to produce an interesting new sound.


 Mixer

A Mixer component mixes up to 4 input signals to produce a single output signals. The volume of each input signal can be set individually.

Parameters

Volume A	Controls the volume of Signal A
Volume B	Controls the volume of Signal B
Volume C	Controls the volume of Signal C
Volume D	Controls the volume of Signal D
Inputs

Sig A	Signal A
Sig B	Signal B
Sig C	Signal C
Sig D	Signal D
Uses and Examples

This component can be used whenever 2 or more signals need to be mixed in fixed proportions.

Mathematical Definition

Output(t) = SigA(t)*VolumeA + SigB(t)*VolumeB + etc...


 Modulator

Multiplies two signal together, so that the second signal acts as a variable “volume control” on the original signal.

Inputs

Sig A	Input signal A
Sig B	Input signal B
Uses and Examples

You can use this component whenever you need to multiply 2 signals together. You can also use it as a fixed volume control, by feeding a signal into SigA, but leaving SigB disconnected. Then the default value of SigB acts as a fixed volume control. Eg, if SigB = 2, the output will be SigA*2

Mathematical Definition

Output(t) = SigA(t)* SigB(t)


 Merger

A Merger component acts as a cross fader. It mixes two signals, by adding them. The proportion of the two signals may be fixed, or may vary with time.

Inputs

Sig A	Input signal A
Sig B	Input signal B
B/A	Controls proportion of each signal eg: 1.0 - the ouput signal is equal to input signal A 0.0 - the output signal is equal to input signal B 0.5 - the output signal is 50% A, and the remaining 50% is B 0.3 - the output signal is 30% A, and 70% B Normally this signal should be limited to a range of 0 to 1. Other values are legal, but may give strange results.
Uses and Examples

This component is used as a cross fader, to mix two other sounds.

It may be used to mix two signals in fixed proportions, or it may be used to cross fade dynamically between two sounds. In that case, the A/B Proportion should be controlled by some kind of envelope (for example a sweep or a sinewave).

Mathematical Definition

Output(t) = SigA(t)*BA(t) + SigB(t)*(1-BA(t))


 Sequencer

This component controls the start and end times of up to 4 different signals. It can also be used to automatically repeat input signals.

Parameters

Start Time A	The time at which signal A is started.
End Time A	The time at which signal A ends.
Repeat A	If this is selected, signal A will start again immediately after it ends, and repeat  indefinitely.

Similar for B, C and D. Each input signal plays from its start time until its end time. If repeat is enabled, the signal repeats continuously after the first playing. All four signals are controlled independently, and can overlap if required.

Inputs

Signal A	Signal A

Similar for B, C and D.

Uses and Examples

This component is useful wherever you wish to build a sound out of a number of separate sounds which all occur at different times. It can also be used simply to delay a signal, or to repeat a signal.

The best way to develop complex sounds like this is to build and test all the elements seperately. When they are all working, add the sequencer and put the sounds all together.


 Music Modulator

This component is used to set oscillator frequencies and sweep ranges in terms of musical notes rather than frequencies. It can also convert a sweep signal to make it musically linear (see below).

Inputs

Signal	The input signal to be modulated. When the input signal is 0.0 (the default), the output value will be the frequency of the note and octave selected in the Parameters. Each unit change in the input signal causes 1 semitone change in the output value.
Parameters

Note	The required musical note, eg. C
Octave	A number representing the required octave. Octave 5 contains middle C. Octave 4 contains the C below middle C, etc.
Uses and Examples

This component may be used as a convenience when setting oscillator frequencies for musical purposes. Simply connect the output of the music modulator into the frequency input of any oscillator, and you can set the required note directly, without needing to calculate its frequency.

The other use of this component is to make tone transitions musically linear. For example, suppose you want a tone to sweep from C5 up to C7 (ie 440 to 1760 Hz). Just having a sweep go from 440 to 1760 will not sound linear, because the ears hears frequencies on a logarithmic scale (that is, 880 Hz sounds as if it is halfway between 440 and 1760, but in a linear sweep the frequency will hit 880 about a third of the way through the signal).

The solution is to generate a linear sweep of 0 to 24 (2 octaves) and feed that through a music modulator. This will generate a musically linear signal.

Mathematical Definition

Output(t) = BASEFREQUENCY * (2 ** (Signal(t)/12))

Where BASEFREQUENCY is the frequency of the note/octave selected in the properties. (2 ** x) means 2 raised to the power x.


 Sample and Hold

Sample and hold takes a “snapshot” of the input signal, each time it is triggered.

Inputs

Signal	Input signal.
Trigger	Trigger signal

The sample and hold is triggered by the Trigger signal. Each time the trigger sample crosses from positive to negative, it samples the current value of the input signal, and stores that value. The output signal is held at the sampled value until the next trigger:


Sweep Envelope Generator

Generates a signal which gradually changes from an initial value to a final value throughout the duration of the sound. This can be used to control a volume or frequency which steadily increases or decreases throughout the duration of the sound.

Parameters

From	The initial value of the sweep.
To	The final value of the sweep.

The signal changes from the initial value to the final value over the duration of the sound:

Inputs

Signal	Input signal.
Uses and Examples

Use the Sweep component to control any value which increases or decreases gradually with time - for example the volume or frequency of another signal.

Mathematical Definition

Output(t) = Signal(t) * (From + (To – From)*t/Duration)


 ADSR Envelope Generator

Generates an Attack/Decay/Sustain/Release (ADSR) envelope. This may be used to control the volume of a tone or other signal, to simulate a note being played on an instrument, etc.

Parameters

The ADSR properties dialog box has the following parameters:

Attack Time	The amount of time the signal takes to rise to its peak.
Attack Peak	The peak volume acheived by the signal.
Decay Time	The amount of time the signal takes to fall to its sustained level.
Sustain Level	The sustained level of the signal after its initial rise and fall.
Release Time	The amount of time the signal takes to fade to zero at the end.
Curve Type Curve Degree	See the technical note on Envelope Curves.

The shape of the signal is as follows:

The envelope generated will always occupy the full duration of the file. The times of the Attack, Decay and Release phases are fixed, but the Sustain time is not. The Sustain time will be automatically adjusted so that the total time of all 4 phases is equal to the duration of the sound.

The ADSR properties dialog displays a graph of the final envelope. The timescale of the graph is determined by the duration of the sound being produced – so it is usually easier if you decide the approximate duration of the sound before you begin. That way, the graph will be a reasonably accurate timescale representation of the envelope.

Inputs

Signal	Input signal, which is modulated by the envelope to produce the output signal. Default unconnected input value is 1.
Uses and Examples

The ADSR signal can be used to control the volume of a source of continuous sound (such as a wind instrument, or a string played with a bow). The volume initially increases as the sound starts (Attack), then dies away slightly (Decay), continues at a constant volume (Sustain), before finally falling away to zero (Release).

Careful choice of parameters can produce other useful envelopes:

Attack/Decay - this is useful for percussive sounds such as plucked strings, drumbeats etc. Set the Sustain Volume and Release Time to zero. Make sure that the sum of the Attack and Delay times is equal to the sound duration (set by the Recorder component).

Attack/Decay/Release - simulates a damped percussive sound. This envelope is set up much the same as an ADSR envelope, but the sum of the A, D and R phases is equal to the total sound duration, so that the Sustain phase is of zero length.

Attack/Sustain/Release - this produces a sound which is constant in volume, except at the start and end. This envelope can be applied to sampled sound sources, to ensure that the sound starts and ends smoothly, without any clicks or pops. Set the peak volume and sustain volume both to 1, and set the decay time to zero.

Mathematical Definition

Output(t) = Signal(t)*envelope(t)

envelope(t) is the ADSR envelope descibed above. It is made up of up to 4 sections. Within each section the rise or fall of the signal is descibed in the technical note on Envelope Curves.


 Envelope Generator

Generates a generic envelope. This component is similar to the ADSR component, but much more general. Instead of just 4 sections in the ADSR, you can have as many sections as you need. This means that it can be used to control not just the volume, but also the frequency and other parameters in a general way.

Parameters

Sections	The set of sections which make up the envelope can be controlled as described below.
Inputs

Signal	Input signal, which is modulated by the envelope to produce the output signal. Default unconnected input value is 1.

The Envelope Editor allows you to edit the individual sections within the envelope. The timescale of the graph is determined by the duration of the sound being produced – so it is usually easier if you decide the approximate duration of the sound before you begin. That way, the graph will be a reasonably accurate timescale representation of the envelope.

When you add or edit a section, you will use the following dialog:

This allows you to control the start value, end value, duration and Curve of each section of the envelope. If you select “Same as previous end value”, the start value of the section will automatically be the same as the end value of the previous section, producing a continuous signal.

Uses and Examples

The Envelope signal can be used wherever you need a generic time varying signal You can use it to control the volume of a signal if the ADSR component isn’t quite what you need, or you can use it to control frequency or any other aspect of a signal.

Mathematical Definition

Output(t) = Signal(t)*envelope(t)

envelope(t) is the envelope described above. It is made up of up to one or more sections. Within each section the rise or fall of the signal is described in the technical note on Envelope Curves.


 Comb Filter

A comb filter is a simple digital “notch” filter, which can be used to great effect in conjunction with noise or other complex signals.

The filter operates by adding together the incoming signal plus a slightly delayed version of the signal. This has the effect of accentuating some frequencies, whilst canceling out others.

The frequency response is a series of regularly spaced peaks and notches, hence the name of the comb filter.

Inputs

Signal	Input signal, which is filtered to produce the output signal.
Frequency	The frequency of the first peak. If the frequency is less than 1Hz, the filter will behave as if the frequency was 1Hz.
Strength	Strength should normally be between 1 (full strength) and 0 (which turns the filter off altogether). Other values are allowed, but may give strange effects.
Uses and Examples

The comb filter is most useful if its peak frequency varies with time. A classic use of a comb filter is in conjunction with a noise signal, to produce a variety of “whooshes” and jet aircraft sounds. Use a sweep or other envelope to sweep the comb frequency through several octaves. The Music modulator can be useful here.

Experiment with other complex signal too.

If you use the comb filter with simple waveforms, particularly square waves, you might not always get the effect you expect. For example, if you feed a 400Hz square wave into a 400Hz comb filter, you should (in theory) get nothing out - in fact, you might get a very narrow 400Hz spike waveform, due to the fact that wave is not continuous in time. In fact, the comb filter is best used with more complex waveforms.

Mathematical Definition

Output(t) = Signal(t) + Strength*Signal(t – 1/Frequency(t))

With the additional constraint that if Frequency(t) is less than 1, the value 1 will be used instead. The comb filter is intended to be used for filtering in the audible domain (20Hz or greater).


 Echo

This component adds single or multiple echoes to a signal.

Parameters

Multiple	Determines if a single echo is produced, or multiple echoes.
Max Delay	Specifies the maximum echo delay. Typically an echo is delayed by only a few seconds from the original signal. If you want to use very long echo delays, increase this parameter.
Inputs

Signal	Input signal.
Delay	The delay between the signal and the first echo
Strength	Strength should normally be between 1 (full strength echo) and 0 (which turns the echo off altogether). Other values are allowed, but may give strange effects.
Uses and Examples

For a normal echo, use a Strength somewhere between 0 and 1. A Delay of anywhere from 0.2 seconds upwards will give a distinct echo, especially if the sound itself is fairly percussive. Shorter delays will tend to “fill out” the sound without giving a distinct echo.

Remember that, if the echo overlaps the sound, the overall volume is likely to be greater than the original sound. You might have to reduce the signal volume to compensate.

You can use Strength greater than 1, which will make the echo louder than the original signal, for an unnatural effect. Beware if multiple echoes are enabled, because each echo will be louder than the last, and will eventually cause distortion.

The Strength and Delay can both be varied in time, by connecting other signals. If you vary the delay, you might notice a strange effect on the echo - it will have a slightly different frequency from the original. This is very similar to the Doppler effect which occurs when a real signal echoes off a moving target (eg a Police speed radar).

Mathematical Definition

Output(t) = Signal(t) + Strength*Signal(t + Delay(t))

With the additional constraint that if Delay(t) is greater than MaxDelay, the value MaxDelay will be used instead.


 Fuzz

This component introduces deliberate distortion by clipping a signal at a fixed level. There are various types of clipping which can be applied for various effects.

Parameters

Upper Limit Clip	The input signal will be clipped by the upper limit signal.
Lower Limit Clip	The input signal will be clipped by the lower limit signal.
Lower Limit Force to zero	See below.
Symmetrical clip	See below.

The diagrams below indicate the effect of the cutoffs when Force to zero and Symmetrical clip are both disabled:

Force to zero has the effect of shifting the signal so that the lower level clipped signal is at zero level (mathematically, it subtracts the Lower Level Cutoff value from the clipped signal).

Symmetrical clipping applies an equivalent clip to both positive and negative going signals. Clip levels must be positive for symmetrical clips. In the diagram below, the lower level cliping is used in conjunction with Force to zero.

Inputs

Signal	The input signal
Upper	The upper limit.
Lower	The lower limit.
Parameters

Inputs

There is a signal input, and lower/upper level inputs. If connected, the level inputs completely override the values set in the dialog.

Uses and Examples

This component is useful for introducing distortion to a signal, for effect.

By varying the level (for example, by sweeping it), it is possible to make the distortion vary with time. For a given signal, making the level lower will generally increase the amount of distortion - but it will also decrease the signal volume.

An alternative way to vary the distortion is to keep the level fixed, but to increase the volume of the input signal. This increases the level of distortion while keeping the signal volume more or less constant.


Moving Average (Top Hat) Filter
 Tophat (Moving Average) Filter

A moving average filter is a simple low pass filter.

The filter has a time width (typically a small fraction of a second, 0.05 to 0.0001 or even smaller). It works by averaging the signal over this time width. This has the effect of smoothing out any rapidly varying signals, hence the lowpass effect.

You can vary the strength of the filter - this operates by mixing a proportion of unfiltered signal in with the filtered signal, decreasing the effect of the filter.

You can also use the filter in high pass mode. In this mode, a proportion of the filtered signal is subtracted from the original signal. By subtracting the low frequencies from the signal, we effectively emphasise the high frequencies.

Parameters

The Tophat  properties dialog box has the following parameters:

Type	High pass or low pass
Inputs

Signal	Input signal.
Strength	Strength of the filter. 1 fully applies the filter, 0.5 applies it at half strength, 0 removes its effect altogether. Values outside the range 0 to 1 are permitted but might have unusual effects.
Frequency	The width of the averaging window, in seconds. Use a very small value (0.05 to 0.0001 or even lower) or you might smooth the signal so much that it will disappear.
Uses and Examples

Use this wherever a simple lowpass filter is required.

For example, by feeding noise through a wide moving average filter, you can achieve a signal which varies slowly but randomly with time - this can be used, for example, to modulate the frequency of an oscillator to give a random vibrato effect.

Mathematical Definition

We define

avg(t1, t2)

to denote the average value of the input signal over the time period t1 to t2, inclusive.

In lowpass mode,

Output(t) = (1-Strength(t))*Signal(t) + Strength(t)*avg(t-1.0/Frequency(t), t)

In hipass mode,

Output(t) =  Signal(t) - Strength(t)*avg(t-1.0/Frequency(t), t)

If


 Mono To Stereo Splitter

Converts a mono sound to a stereo sound. The mono signal is split to provide both left and right channels of the stereo signal. The volume of the left and right channels can be varied independently.

Inputs

Signal	The signal (mono)
Left	Determines the volume of the left channel.
Right	Determines the volume of the right channel.
Uses and Examples

Use this component to convert a mono signal into a stereo signal, and to control the volume of the signal in the left and right channels. For more information see the tutorial.

Mathematical Definition

The output signal is a stereo signal, consisting of left and right channels. The inputs are mono signals.

OutputLeft(t) = Signal(t)*Left(t)

OutputRight(t) = Signal(t)*Right(t)


 Mono To Stereo Pan

Converts a mono sound to a stereo sound. The mono signal is split to provide both left and right channels of the stereo signal. The volume of the left and right channels can be varied by a single Pan value..

Inputs

Signal	The signal (mono)
Pan	Determines the volume of the left and right channels. A Pan of zero sends the signal to the left channel (right channel is zero), a Pan of 1.0 sends the signal to the right channel (left channel is zero). A Pan of 0.5 sends half of the signal to each channel, etc. Values of Pan less than 0 or greater than 1 are legal, but not particularly useful, see the mathematical definition below.
Uses and Examples

Use this component to convert a mono signal into a stereo signal, and to control the volume of the signal in the left and right channels. For more information see the tutorial. This component is similar to the Mono To Stereo Splitter component, but it uses a single Pan value to control both channels.

Mathematical Definition

The output signal is a stereo signal, consisting of left and right channels. The inputs are mono signals.

OutputLeft(t) = Signal(t)*(1.0 - Pan(t))

OutputRight(t) = Signal(t)*Pan(t)


 Stereo To Mono Merger

Converts a stereo sound to a mono sound. The 2 channels of the input signal are merged to provide a mono output. The amount of the left and right channels can be varied independently.

Inputs

Signal	The signal (stereo)
Left	Determines the amount of the left channel to include in the output.
Right	Determines the amount of the right channel to include in the output.
Uses and Examples

Use this component to convert a stereo signal into a mono signal, and to control how the left and right channels of the input are mixed. You might wan to do this, for example, if you are reading in a stereo WAV file, but want to produce mono output. For more information see the tutorial.

Mathematical Definition

The input signal is a stereo signal, consisting of left and right channels. The output, and the Left and Right inputs, are mono signals.

Output(t) = SignalLeft(t)*Left(t) + SignalRight(t)*Right(t)


 Stereo To Mono Pan

Converts a stereo sound to a mono sound. The 2 channels of the input signal are merged to provide a mono output. The amount of the left and right channels can be varied by a single Pan value.

Inputs

Signal	The signal (stereo)
Pan	Determines the proportion of the left and right channels of the input signal which will be mixed to form the output. A Pan of 0.0 means that the output signal is equal to the Left channel of the input signal. A Pan of 1.0 means that the output signal is equal to the Right channel of the input signal. A Pan of 0.5 means that the output signal is half of the left plus half of the right, etc   Values of Pan less than 0 or greater than 1 are legal, but not particularly useful, see the mathematical definition below.
Uses and Examples

Use this component to convert a stereo signal into a mono signal, and to control how the left and right channels of the input are mixed. You might wan to do this, for example, if you are reading in a stereo WAV file, but want to produce mono output. For more information see the tutorial. This component is similar to the Stereo To Mono Merger component, but it uses a single Pan value to control both channels.

Mathematical Definition

The input signal is a stereo signal, consisting of left and right channels. The output, and the Pan input, are mono signals.

Outputt(t) = SignalLeft(t)*(1.0-Pan(t)) + SignalRight(t)*Pan(t)


 Stereo To Stereo Cross

This component takes a stereo input signal and allows you to cross mix the left and right channels to produce a new stereo signal.

Inputs

Signal	The signal (stereo)
LeftToLeft	Determines how much of the left input channel will be mixed into the left output channel.
LeftToRight	Determines how much of the left input channel will be mixed into the right output channel.
RightToLeft	Determines how much of the right input channel will be mixed into the left output channel.
RightToRight	Determines how much of the right input channel will be mixed into the right output channel.
Uses and Examples

With this component, you can perform any required cross mixing of stereo channels.

Mathematical Definition

The input signal and output signal are stereo signals, consisting of left and right channels. The other inputs are mono signals.

OutputLeft(t) = SignalLeft(t)*LeftToLeft(t) + SignalRight(t)*RightToLeft(t)

OutputRight(t) = SignalLeft(t)*LeftToRight(t) + SignalRight(t)*RightToRight(t)


Technical Notes

Choosing Output File Parameters

Working with Stereo Sound

Envelope Curves

Using Offsets with Wavform Generators


Output File Parameters

Output file parameters are controlled by the Recorder component. The values you choose for the parameters will affect the quality of the sound produced. They will also affect the size of the output file and the amount of time it takes to generate to sound file.

Also bear in mind that a higher quality file containing more data will place a greater load on the system while it is actually being played.

Samples per Second

The sound file simulates a real sound signal (which is continuous) by storing a sequence of discrete samples. By default, Quack stores 22050 samples per second. This allows almost any audible frequency to be reproduced, although very high pitch components of the sound may be distorted. This does not normally affect the sound quality too badly, because high pitch components usually make up a small part of most sounds.

For very demanding applications, double the sample rate to 44100. This will also double the file size, and double the amount of time taken to produce the file. You could use even higher sample rates, but at very high rates your computer/sound card may not be able to handle the data rate.

If you are experimenting, you might want to select a lower sample rate (11025, or even lower) so that the sound file in generated a bit faster.

Bits per Sample

Normally, the sound samples are stored as 16 bit integers, which means that there are 65536 different sound levels available.

You can select 8 bits per sample, which only allows 256 different sound levels. This means that the sound is not reproduced as accurately, and some distortion is introduced, but the sound file is halved in size. This is not recommended if you want to achieve high quality sound.

Quack will take approximately the same amount of time to generate a sound file whether it is 8 or 16 bits per sample.

Volume

It important to set the correct volume for the output file. If the volume is too high, the signal will be clipped and distorted. If the volume is too low, the signal will not use the whole available range of your soundcard, and so will not be as good as it could be (the signal might also be too quiet).

Ideally, you should choose a volume so that the peak signal is close to (but not greater than) 1. This can often be achieved simply by setting the volume of all the components in the sound to 1 (which is the default).

If the volume of your sound is out of range for any reason, you can correct it in the Recorder Component. A message box will appear after the sound has been generated, warning you that the volume is wrong and suggesting the best value to use.

Stereo

It is possible to generate stereo output from Quack. See the technical note on Working with Stereo Sound.

A stereo file is twice as large as the equivalent mono file. It may also take twice as long to produce the file..


Stereo Sound

To create a stereo sound, you must check the Stereo checkbox in the Recorder properties. This causes the Recorder to generate a stereo WAV file, which is a type of WAV file which includes 2 separate signals for the left and right channels.

For a full description of stereo working, take a look at the tutorial.


WAV format is a standard format for sound files, supported by many Windows applications including Sound Recorder and Media Player.

Quack uses a very simple version of the WAV format, and does not rely on any advanced features of the format. Files generated by Quack should therefore be compatible with as many other applications as possible.


Envelope Curves

Functions which generate envelopes, such as the ADSR Envelope Generator, generally specify a number of transitions, during which the sound level changes with time.

For example, the Attack phase of the ADSR envelope, starts at zero and rises to the peak volume, within a fixed amount of time (the attack time). However, many natural sounds do not change volume linearly with time. There are three possibilities, controlled by the Curve Type parameter. Notice that in all three cases, the curve starts in the same place and ends up in the same place, it is just the route which varies.

In the first case, Linear, the rise (or fall) of volume is linear with time. The Curve Value is unused in that case.

In the second case, Slow Start the volume rises exponentially with time. That is, the change in volume is slow at first, but gradually becomes faster as the sound develops. This can be used to simulate sounds such as wind instruments. The Curve Value controls the amount of curvature. ) is linear (no curve), a smallish number in the range 1 to 5 or so gives a reasonable curve. Normally you would probably not use values of greater than 10 (although you can if you wish).

In the final case, Fast Start the volume rises as the inverse exponential of time. That is, the change in volume is rapid at first, but gradually becomes slower as the sound develops. This can be used to simulate sounds such as percusive instruments. The Curve Value operates in a similar way to the Slow Start case.

Mathematical Definition

The basic signal shape is defined by formula in which the value rises from 0 to 1 over the course of 1 second. This basic shape is then scaled in time and value to create a real envelope section.

Linear:	v = t

Slow Start:	v = (1 - exp(c*t))/(1 - exp(c))

Fast Start:	v = (1 - exp(-c*t))/(1 - exp(-c))

Where v is the volume, t is time, c is the curve parameter, and exp is the exponential function.


Using Offsets with Waveform Generators

By default, waveform generators produce a signal which oscillates about zero. For example, a Sawtooth with a volume of 1.0 will oscillate between +1.0 and -1.0. This type of waveform is useful for producing audible tones.

Sometimes it is useful to have a waveform which oscillates about some value other than zero. For convenience, all waveform generators allow you to define an Offset. When an offset is specified, the whole wave is shifted. For example, if an offset of 3.0 is applied to a sawtooth with a volume of 1.0, the wave will oscillate between +2.0 and +4.0:

This type of waveform can be used to generate effects such as tremolo and vibrato. Of course, other wave shapes can be used instead of the sawtooth.

For tremolo effects (where the volume of a sound oscillates slightly), use an offset of 1.0, and a low volume (a value of 0.2 is a good starting point, but this value can be varied to alter the effect). The frequency should be low (start with something between 1 and 10 cycles per second, but again this can be varied). This gives a signal which varies slowly, with an average value of about 1. Use this signal to control the volume of another sound.

For vibrato effects (where the frequency of a sound oscillates slightly), use an offset equal to the basic frequency of the tone you want to create, and a volume  equal to about 20% of the offset. For example, to produce a 1000Hz tone with vibrato, use a waveform generator with offset 1000, volume 200, and a frequency of 1 to 10. Use this output to drive the frequency input of a second waveform generator.


The Recorder component is responsible for generating the sound file. Every patch map must have one (and only one) Recorder component. The output component is present in the patch map when it is created - you cannot delete this component, or create new versions of it. You can modify the parameters of this component.


Registration

How to register

The easiest way to register is online. Please refer to the Help|Register menu which will provide the web address of an online store where you can register this program. Alternatively, look in the file register.txt which came with this program, or contact us at

http://www.morello.co.uk/order.htm

morello@shareware.demon.co.uk

Registration costs just $49 (US Dollars)

You can also register directly with us, although this is not our recommended method. For details see the order form.

About shareware

QUACK Sound Effects Studio is shareware. This means that you are free to use it for evaluation purposes for up to 30 days after you first install it. If you wish to continue using it after this period, you must register.

The purpose of shareware is to allow you to evaluate the product before paying for it. In order for the development of QUACK to continue, we rely on the honesty of our users. To encourage registration, the unregistered version is has various deliberate limitations which are removed when you register. For example, you cannot save your work with the unregistered version.

You are permitted (and encouraged) to distribute the unregistered version of this program freely to others, via any means such as the Internet or CD-ROM provided it is complete and unmodified, including all help files and copyright notices, and that you do not claim to own it, and that you do not charge for it other than a reasonable fee to cover distribution costs. You do not need our permission, but please drop us an email so that we can add you to our mailing list.

You are not allowed to distribute the Registered Version you will receive as a result of registering. You can easily tell the shareware version by looking in the About box (Help|About menu). The shareware version has the word shareware in the version string.

What you get when you register...

If you are registering with an online store, please refer to their web site for details of how to pay and how you will receive your registered copy of the software. Normally you will be sent the registered copy via the Internet shortly after you place your order.

You will not receive a copy of the program on disk (unless the online store specifically tell you otherwise).


Order Form

To order your registered copy please print this form and send it to us, or if you are submitting a handwritten order please ensure that you have included all the relevant information. You will probably find it quicker and easier to register online, as described under Registration.

I wish to register QUACK Sound Effects Studio V4 (or the latest version). I understand that the registered version will be mailed to me on 3.5 floppy, and may take 2 to 3 weeks to arrive. I have read and agree to the license terms.

Name: _________________________________________________

Address: _______________________________________________

_______________________________________________________

_______________________________________________________

_______________________________________________________

_______________________________________________________

Email (optional): _________________________________________

US Customers:  Please enclose a cheque for $54US (including $5 shipping) payable to Morello Publishing Ltd.

Non-US Customers: Please enclose a cheque for the equivalent (not less than) $54US in your local currency.

Please mail your completed form to:

Morello Publishing Ltd

PO Box 3201

Milton Keynes

MK5 7YZ

ENGLAND


Licence

Shareware License

The shareware version is supplied with absolutely no warranty, and is used entirely at your own risk. You may use it for evaluation purposes only, free of charge for a maximum of 30 days. You may also distribute it freely to others under the conditions described under Registration.

The shareware version of this program includes the word “shareware” in the About box (from the Help|About menu). This differentiates it from the Registered version. The registered version must NOT be distributed and must NOT be used unless you have paid the registration fee.

Registered License

When you purchase a registered version of the program by paying a registration fee to Morello Publishing Ltd or one of our authorised resellers, the following terms apply:

You are granted non-exclusive licence to use one copy of the software on one computer. [See note 1]

You are permitted to keep one copy of the program for genuine backup purposes. [See note 2]

Morello Publishng Ltd retain ownership of the software [See note 3]

The software is supplied without warranty [See note 4]

In any event our liability is limited to the price of the software. [See note 5]

Notes

1. The software is “in use” if it is loaded into a computer’s permanent or temporary memory. If the software is loaded onto a network server, you must purchase a licence for every computer which has access to the software. The licence is not transferable without the written permission of Morello Publishing Ltd.

2. Any backup copy of this software must be complete, and must include all copyright and licence information.

3. You may not disassemble, decompile, reverse engineer or modify this software in any way. You may not transfer this software by network, telephone or electronically by any means (except in the course of purchasing the software from an authorised reseller).

4. Morello Publishing Ltd expressly disclaim any warranty including, but not limited to, the implied warranty of merchantability and fitness for a particular purpose. In no event will we be liable for any costs of procurement of alternative products, lost profits, loss of information or data, or any other special, indirect, consequential or incidental damages arising in any way out of the sale of, use of, or inability to use this software, even if we have been advised of the possibility of such damages.

5. In no event will our liability exceed either the price you paid for the software, or our recommended retail price for the software at the time it was purchased from Morello Publishing Ltd or an authorised reseller, whichever is lower.


Morello Products

Morello Publishing Ltd develop a range of multimedia, educational and utility programs for Windows (95, 98 and NT4). All our products are shareware. You can find out the latest details and download a free demo from our web site:

http://www.morello.co.uk

A summary of the current version each of the products is included below:

Morello PuzzleTrack	Generate your own Crosswords and word search puzzles.
QUACK Sound Effects Studio	Produce your own sound effects with this easy to use program.
Morello Clam	Visual scripting program. The easiest way to powerful Windows automation!
Morello WasteOfSpace	Keep your disk clear of unwanted junk.
MindSet	Post it notes in a tabbed window so that multiple notes are always handy.
Matrix Calculator	Simple pocket calculator style program for matrix calculations.


Morello Products - PuzzleTrack
Morello PuzzleTrack

Available from http://www.morello.co.uk/puzzle.htm

Morello PuzzleTrack is the easy way to create crosswords and word search

puzzles under Windows 95/98/NT.

Features:

Wizards guide you through every stage of creating a puzzle.

Completely automatic formatting and numbering of crossword puzzles. All you need to do is decide on the format and think up the clues.

Automatic layout of word search puzzles - just supply the words.

Embed puzzles directly into your newsletter or publication. OLE lets you create and edit puzzles from within most WP or DTP applications.

Fully visual editing.

Choose from a variety of styles, and set your own colour schemes.

Create puzzles of any shape.


Morello Products - Quack
Quack Sound Effects Studio

Available from http://www.morello.co.uk/quack.htm

QUACK Sound Effects Studio lets you create your own original sound effects with an easy to use visual editor. Simply select basic components from the toolbar, and plug them together in any combination, and create exactly the sound you need.

Then, create your sound file - up to 16 bit CD quality stereo, in standard WAV format, ready to use in your game, music, multimedia publication, or whatever you wish.

QUACK comes with 6 basic sound sources:

- Sine, square, sawtooth oscillators

- Fourier waveform generator

- Noise

- WAV file input (to import real sounds)

As with all QUACK components, you can use the output of one component to control another - for example you can use a slow oscillator to add vibrato to a second oscillator. This allows combinations of almost unlimited complexity.

Complex sounds can be synthesized from simple sounds using several different techniques (or any combination of them):

- Mixing

- Merging

- Modulating

- Sequencing

- Music modulation

- Sample and hold

3 different envelopes are available

- Sweep

- ADSR

- General envelope

There are 5 components to support mone/stereo conversion.

Finally, a variety of filters and modifiers can be used for other effects:

- Comb filter

- Moving Average (Top Hat) filter

- Echo

- Fuzz

All components and techniques are covered in detail in the comprehensive Tutorial/Help file, and of course you can try them out for yourself by downloading our Shareware demo.


Morello Products - Clam
Morello Clam

Available from http://www.morello.co.uk/quack.htm

Morello Clam is a visual scripting language for automating Windows95/98/NT.

Use visual editing to construct powerful scripts to automate tedious tasks - without the need to learn a complex programming language, without having to remember command line arguments to set up batch files.

Clam has 15 multi-functional commands such as:

File Actions - Copy, Delete etc files and folders;

File Information - Get property information for files, folders and volumes;

System Information - such as processors and memory information;

Registry Access;

Run - execute other applications automatically;

4 different loops and conditionals, including wildcard file looping;

and more...

Clam also features a single-step debug tool, a simple to use visual editor,

a comprehensive help file and tutorials.


Morello Products - WasteOfSpace
Morello WasteOfSpace

Available from http://www.morello.co.uk/wasp.htm

Morello WasteOfSpace is an easy to use program for finding and deleting unwanted

files on your hard disk. It has an Explorer-style interface, but it offers:

	5 different ways of sorting your files or folders, designed to help identify wasted space.
	List, bar chart and pie chart displays.
	Single or multiple volume scans
	Filtering, to restrict the scan to certain file types and sizes.
	Junk-It: Prescheduled automatic deleting of selected file types and disk areas.
	Printing and file export (text, bmp or metafiles) for graphs and listings.
	Explorer-style Open, Delete and Properties functions
	Complete scan information can be saved to disk for later comparison.


Morello Products - MindSet
Morello MindSet

Available from http://www.morello.co.uk/mindset.htm

Morello MindSet is an easy to use post-it style memo program for Win95. It features a tabbed interface, so that multiple memos are always available. Other features are an easy to use cut and paste interface, automatic data storage, printing, searching, text export, and an always-on-top mode.


Morello Products - Matrix Calculator
Morello Matrix Calculator

Available from http://www.morello.co.uk/matcalc.htm

Morello Matrix Calculator is a simple, pocket calculator style program which performs most standard matrix calculations. It supports matrices up to 20 elements square (shareware version is limited to 2 elements square). It also allows data to be exchanged with most common spreadsheets and other programs via the clipboard or text files.